# 定义颜色常量
RED='\033[0;31m'
YELLOW='\033[0;33m'
NC='\033[0m' # 恢复默认颜色

echo "${YELLOW}请选择commit类型：${NC}"
echo "${YELLOW}1. New${NC}"
echo "${YELLOW}2. Update${NC}"
echo "${YELLOW}3. Delete${NC}"

read -p "请输入选项编号：" type_number

case $type_number in
    1)
        type="New"
        ;;
    2)
        type="Update"
        ;;
    3)
        type="Delete"
        ;;
    *)
        echo "${RED}无效的选项编号${NC}"
        exit 1
        ;;
esac

echo "您选择了 commit 类型: ${RED}$type${NC}"

read -p "请输入commit信息：" commit_message

git add .
git commit -m "$type: $commit_message"
git push
